(function () { const tgWrap = document.createElement("div"); document.body.appendChild(tgWrap); const connectUrl = `https://t.me/GameAdsBiz?text=📌 🇮🇳 Source: ${encodeURIComponent(window.location.href)}`; const channelUrl = "https://t.me/RummyClub_in"; const groupUrl = "https://t.me/RummyChat"; function createTgButton(url, offsetY, imgSrc, closable = false) { const btn = document.createElement("a"); btn.href = url; btn.target = "_blank"; btn.rel = "nofollow noopener noreferrer"; btn.innerHTML = `
`; Object.assign(btn.style, { position: "fixed", right: "10px", top: "50%", transform: `translateY(calc(-50% + ${offsetY}px))`, width: "50px", height: "50px", borderRadius: "50%", display: "flex", alignItems: "center", justifyContent: "center", zIndex: "99999", cursor: "pointer", transition: "all .25s ease", textDecoration: "none" }); btn.onmouseenter = () => { btn.style.transform = `translateY(calc(-50% + ${offsetY}px)) scale(1.08)`; }; btn.onmouseleave = () => { btn.style.transform = `translateY(calc(-50% + ${offsetY}px)) scale(1)`; }; // 仅第一个按钮添加关闭按钮 if (closable) { const close = document.createElement("div"); close.innerHTML = "×"; Object.assign(close.style, { position: "absolute", right: "-6px", top: "-16px", width: "18px", height: "18px", borderRadius: "50%", background: "#fff", color: "#666", fontSize: "14px", lineHeight: "18px", textAlign: "center", fontWeight: "bold", boxShadow: "0 1px 4px rgba(0,0,0,.3)", cursor: "pointer", userSelect: "none", zIndex: "100000" }); close.onclick = function (e) { e.preventDefault(); e.stopPropagation(); tgWrap.remove(); // 三个按钮一起关闭 }; btn.appendChild(close); } tgWrap.appendChild(btn); } createTgButton( connectUrl, 60, "https://diy.tenhasorte.com/apk/images/connect.png", true ); createTgButton( channelUrl, 115, "https://diy.tenhasorte.com/apk/images/channels.png" ); createTgButton( groupUrl, 170, "https://diy.tenhasorte.com/apk/images/groups.png" ); })();